#include <ntddk.h>

#include "AllocateMem.h"

PVOID operator new(size_t size, POOL_FLAGS fPoolFlags, ULONG dwTag) 
{
    return ExAllocatePool2(fPoolFlags, size, dwTag);
}

PVOID operator new[](size_t size, POOL_FLAGS fPoolFlags, ULONG dwTag)
{
    return ExAllocatePool2(fPoolFlags, size, dwTag);

}

void operator delete(PVOID p, size_t)
{
    if (p) 
    {
        ExFreePool(p);
    }
}

void operator delete[](PVOID p) 
{
    if (p) 
    {
        ExFreePool(p);
    }
}